package com.zhang.zxx.easyexcel.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * WidthAndHeightData:设置写入Excel的列宽行高设置
 * 说明:@ContentRowHeight(30) //设置内容高度
 * 说明:@HeadRowHeight(40)    //设置标题高度
 * 说明:@ColumnWidth(25)      //设置列宽
 *
 * @author zhangxiaoxiang
 * @date 2021/01/13
 */
@ContentRowHeight(30)
@HeadRowHeight(40)
@ColumnWidth(25)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class WidthAndHeightData {
    @ExcelProperty("字符串标题")
    private String string;
    @ExcelProperty("日期标题")
    private Date date;
    /**
     * 设置列宽(可以修饰类,也可以修饰具体属性)
     */
    @ColumnWidth(50)
    @ExcelProperty("数字标题")
    private Double doubleData;
}
